CREATE TABLE [dbo].[Comment]
(
[CommentId] [int] NOT NULL IDENTITY(1, 1),
[ParentCommentId] [int] NULL,
[ProductId] [int] NOT NULL,
[Content] [nvarchar] (4000) COLLATE Cyrillic_General_CI_AS NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[LastModifiedDate] [datetime] NOT NULL,
[IsDeleted] [bit] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Comment] ADD CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED  ([CommentId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Comment] ADD CONSTRAINT [FK_Comment_Product] FOREIGN KEY ([ProductId]) REFERENCES [dbo].[Product] ([ProductId])
GO
